package com.itic.appbase.framework.type;

public enum FinanceType {
	
	Income("001","收入"),Pay("002","支出"),Reflect("003","提现"),Back("004","退款");
	private String type;
	private String name;
	FinanceType(String type ,String name){
		this.type = type;
		this.name = name;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public static FinanceType getType(String type) {
		FinanceType financeType = null;
		switch (type) {
		case "001":
			financeType = FinanceType.Income;
			break;
		case "002":
			financeType = FinanceType.Pay;
			break;
		case "003":
			financeType = FinanceType.Reflect;
			break;
		case "004":
			financeType = FinanceType.Back;
			break;
		default:
			break;
		}
		return financeType;
	}
	
}
